This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Add --dry-run option to pull cmd #1818
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Add
--dry-runoption topullcommand.Our final goal is adding the
--dry-runtoupand I started with the case ofpullat first.This is a proposal.
Example usage
$ docker compose --project-directory local/e2e/compose/fixtures/dry-run-test/pull/ pull --dry-run --format json { "Services": [ { "Name": "expectedSkip", "Image": "alpine", "LocalDigests": [ "sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0" ], "DistributionDigest": "sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0", "Plan": "skip" }, { "Name": "expectedFail", "Image": "expected-not-to-be-registered", "LocalDigests": [], "DistributionDigest": "", "Plan": "fail" }, { "Name": "expectedFetch", "Image": "hello-world", "LocalDigests": [], "DistributionDigest": "sha256:9f6ad537c5132bcce57f7a0a20e317228d382c3cd61edae14650eec68b2b345c", "Plan": "fetch" } ] }Related issue
https://github.com/docker/compose-cli/issues/1090
UPDATE:
Example usages' style was broken. fixed.